import request from '../../request'

//  获取科室列表
export function getEnumDetailSource(params) {
  return request({
    url: 'bdEnumdetail/getEnumDetailSource',
    method: 'POST',
    data: params
  })
}

// 获取月份下拉框-科室分摊
export function getYearMonth(params) {
  return request({
    url: 'ruleAmortization/getYearMonth',
    method: 'POST',
    data: params
  })
}

// 获取月份下拉框-定向
export function getDirectYearMonth(params) {
  return request({
    url: 'ruleDirectamortization/getYearMonth',
    method: 'POST',
    data: params
  })
}

// 修改-科室分摊
export function modifyRuleAmortization(params) {
  return request({
    url: '/ruleAmortization/modifyRuleAmortization',
    method: 'POST',
    data: params
  })
}

// 科室模糊查询
export function getCostDepartments(params) {
  return request({
    url: 'bdDepartment/getCostDepartments',
    method: 'POST',
    data: params
  })
}

//   添加科室部门对应数据
export function ruleAaddRuleAmortization(params) {
  return request({
    url: 'ruleAmortization/addRuleAmortization',
    method: 'POST',
    data: params
  })
}

// 查询所有科室
export function getDepartmentSource(params) {
  return request({
    url: 'bdDepartment/getDepartmentSource',
    method: 'POST',
    data: params
  })
}

export function getDeptCodeBdDepartments(params) {
  return request({
    url: 'bdPerformance/getDeptCodeBdDepartments',
    method: 'get'
    // data: params
  })
}

// 查询科室
export function listEtlDepartmentFuzzy(params) {
  return request({
    url: 'etlDepartment/listEtlDepartmentFuzzy',
    method: 'POST',
    data: params
  })
}

export function listEtlDepartment(params) {
  return request({
    url: 'etlDepartment/listEtlDepartment',
    method: 'POST',
    data: params
  })
}

// 查询未关联科室
export function listEnumDetailUnLink(params) {
  return request({
    url: '/bdEnumdetail/listEnumDetailUnLink',
    method: 'POST',
    data: params
  })
}

// 查询所有分摊
export function getRuleAmortization(params) {
  return request({
    url: 'ruleAmortization/getRuleAmortization',
    method: 'POST',
    data: params
  })
}
// 查询所有分摊-详情
export function getRuleAmortizationById(params) {
  return request({
    url: 'ruleAmortization/getRuleAmortizationById',
    method: 'POST',
    data: params
  })
}

// 新增 强制分摊
export function addRuleCompelamortization(params) {
  return request({
    url: 'ruleCompelamortization/addRuleCompelamortization',
    method: 'POST',
    data: params
  })
}
// 继承 定向分摊
export function insertBatchDirectaAllocationn(params) {
  return request({
    url: '/ruleDirectamortization/insertBatchDirectaAllocationn',
    method: 'POST',
    data: params
  })
}

// 获取详情- 定向分摊
export function getDrectDetailsById(params) {
  return request({
    url: `ruleDirectamortization/getDirectaAllocationById`,
    method: 'post',
    data: params
  })
}
// 获取详情- 强制分摊
export function getRuleCompelAmortizationById(params) {
  return request({
    url: `ruleCompelamortization/getRuleCompelAmortizationById`,
    method: 'post',
    data: params
  })
}

//  获取强制分摊
export function getCompelAmortization(params) {
  return request({
    url: 'ruleCompelamortization/getCompelAmortization',
    method: 'POST',
    data: params
  })
}
//  继承-强制分摊
export function insertBatchRuleCompelAmortization(params) {
  return request({
    url: 'ruleCompelamortization/insertBatchRuleCompelAmortization',
    method: 'POST',
    data: params
  })
}

// 删除  定向分摊
export function deleteCompelAmortization(params) {
  return request({
    url: 'ruleCompelamortization/DeleteCompelAmortization',
    method: 'POST',
    data: params
  })
}

// 新增定向分摊
export function addDirectaAllocation(params) {
  return request({
    url: 'ruleDirectamortization/addDirectaAllocation',
    method: 'POST',
    data: params
  })
}

// 查询 - 定向分摊
export function getDirectaAllocation(params) {
  return request({
    url: 'ruleDirectamortization/getDirectaAllocation',
    method: 'POST',
    data: params
  })
}

// 修改啟用 - 定向分摊
export function modifyDirectaAllocation(params) {
  return request({
    url: 'ruleDirectamortization/modifyDirectaAllocation',
    method: 'POST',
    data: params
  })
}

// 修改 - 强制分摊
export function updateCompelamortization(params) {
  return request({
    url: 'ruleCompelamortization/updateCompelamortization',
    method: 'POST',
    data: params
  })
}

// 删除 - 定向分摊
export function DeleteDirectaAllocation(params) {
  return request({
    url: 'ruleDirectamortization/DeleteDirectaAllocation',
    method: 'POST',
    data: params
  })
}

// 获取月份下拉框-强制分摊
export function getRuleCompelamortizationYearMonth(params) {
  return request({
    url: 'ruleCompelamortization/getYearMonth',
    method: 'POST',
    data: params
  })
}

// 继承-科室分摊
export function insertBatchRuleAmortization(params) {
  return request({
    url: 'ruleAmortization/insertBatchRuleAmortization',
    method: 'POST',
    data: params
  })
}
// 新增收入
export function addBaseInCome(params) {
  return request({
    url: 'baseInCome/addBaseInCome',
    method: 'POST',
    data: params
  })
}

// 新增成本数据
export function addBaseCost(params) {
  return request({
    url: 'baseCost/addBaseCost',
    method: 'POST',
    data: params
  })
}

// 收入数据-删除
export function deleteIncomData(id, year) {
  return request({
    url: `baseInCome/remove/${id}/${year}`,
    method: 'get'
  })
}
// 成本数据-删除
export function deleteBaseCost(id, year) {
  return request({
    url: `baseCost/remove/${id}/${year}`,
    method: 'get'
  })
}
// 科室分摊-检查
export function checkNoAmortizationDept(params) {
  return request({
    url: `/ruleAmortization/checkNoAmortizationDept`,
    method: 'get',
    params
  })
}

